package com.qf.controller;

import com.qf.dto.PageSearchDTO;
import com.qf.entity.MallGoodsTemplate;
import com.qf.entity.SysUser;
import com.qf.service.IUserTableService;
import com.qf.vo.PageResult;
import com.qf.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/*
    作者：Administrator
    时间：2021/9/27 0027 10:15
* */
@RestController
@CrossOrigin
@RequestMapping("userTable")
public class UserTableController {
    @Autowired
    private IUserTableService userTableService;
    @PostMapping("page")
    public PageResult<SysUser> page(@RequestBody PageSearchDTO<SysUser> dto){


        return userTableService.selectByPage(dto);

    }
    @RequestMapping("save")
    public Result save(@RequestBody SysUser sysUser){

        return  userTableService.save(sysUser);
    }
}
